//路径到组件的映射
import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../views/Login.vue'
import Home from '../views/Home.vue'
// 学生
import Join from '../views/users/Join.vue'
import Submit from '../views/users/Submit.vue'
import Query from "../views/users/Query.vue"
import ScoreList from "../views/users/ScoreList.vue"
// 管理员
import Competition from '../views/admins/Competition.vue'
import Group from '../views/admins/Group.vue'
import Student from '../views/admins/Students.vue'
import Reviewers from "../views/admins/Reviewers.vue"
import Notice from "../views/admins/Notice.vue"
import Works from "../views/admins/Works.vue"
// 评审
import Scoring from "../views/reviewers/Scoring.vue"
// 系统
import Forgot from "../views/System/Forgot.vue"

// 要告诉 vue 使用 vueRouter
Vue.use(VueRouter)

// 路由
const routes = [
	{
		path: '/',
		name: 'Login',
		component: Login,
		hiddren:true
	},
	{
		path: '/forgot',
		name: 'Forgot',
		component: Forgot,
		hiddren:true
	},
	{
		path: '/home',
		name: 'Home',
		component: Home,
		hiddren:true,
		children:[
			{
				path:'/join',
				name: '学生报名',
				component: Join,
			},
			{
				path:'/submit',
				name: '提交作品',
				component: Submit,
			},
			{
				path:'/query',
				name: '成绩查询',
				component: Query,
			},
			{
				path:'/competition',
				name:'比赛管理',
				component:Competition,
			},
			{
				path:'/group',
				name:'小组管理',
				component:Group,
			},
			{
				path:'/student',
				name:'学生管理',
				component:Student,
			},
			{
				path:'/reviewers',
				name:'评审员管理',
				component:Reviewers,
			},
			{
				path:'/notice',
				name:'公告管理',
				component:Notice,
			},
			{
				path:'/scoring',
				name:'在线打分',
				component:Scoring,
			},
			{
				path:'/works',
				name:'作品管理',
				component:Works,
			},
			{
				path:'/scorelist',
				name:'成绩榜单',
				component:ScoreList,
			}
		]
	},
]

const router = new VueRouter({
	routes
})

export default router
